#version 150

in vec3 Color;
out vec4 outColor;
uniform vec3 triangleColor;

uniform sampler2D tex;
uniform sampler2D tex2;
in vec2 Texcoord;
uniform float time;


void main() {
	float p = sin(time) / 2 + 0.5;
	// p = 0;
	vec2 newcoord;
	newcoord = Texcoord;
	newcoord.x = newcoord.x + 0.01 * sin(60*newcoord.y + time*5);
    outColor =   p * texture(tex, newcoord)
               + (1 - p) * texture(tex2, newcoord)
               + 0.0 * vec4(1-Color, 1.0);
}
